import { Component, OnInit } from '@angular/core';
import { NzFormatEmitEvent } from 'ng-zorro-antd';

@Component({
    selector: 'app-mng-gate-water',
    templateUrl: './mng-gate-water.component.html',
    styleUrls: ['./mng-gate-water.component.scss']
})
export class MngGateWaterComponent implements OnInit {
    listData = [];
    currentNode;
    contentTitle: string;
    gateId; //  斗口id

    today = new Date();

    gateDetailData = [];
    constructor() {
    }

    ngOnInit(): void {
    }

    selectedAreaChanged(event: NzFormatEmitEvent): void {
        console.log(event);
        this.currentNode = event.keys;
        const nodeClick = event.node;
        // this.currentNode = event.node.key;
        nodeClick.isSelected = true;
        this.contentTitle = event.nodes[0].title;
        if (this.currentNode[0] !== 33 && this.currentNode[0] !== 34 && this.currentNode[0] !== 35) {
            this.getGridData(this.currentNode[0]);
        }
    }

    getGridData(id): void {
        this.gateId = id;
    }

    onDateChanged(date): void {

    }

    exportFile(): void {

    }
}
